import { useRoute } from "vue-router";
import { ref } from "vue";

export function useChangeColor() {
    const needChangeRoute = ["/main/healthAssessment", "/main/faultDetection", "/main/conditionMonitoring", "/main/conditionStatistic"];
    const route = useRoute();
    const borderColor = ref("#EBEBEB");
    const bgColor = ref("#fff");
    const fontColor = ref("#1B3646");
    const formFontColor = ref("#1B3646");
    const subFontColor = ref("#595959");
    const mainBgColor = ref("#ecf1f3");
    const anotherColor = ref("#00428E");
    if (needChangeRoute.includes(route.path)) {
        bgColor.value = "#0E2B3D";
        fontColor.value = "#fff";
        subFontColor.value = "#fff";
        mainBgColor.value = "#0C1E28";
        anotherColor.value = "#4BA6DD";
        borderColor.value = "#4BA6DD";
        formFontColor.value = "#C5D8FF";
    }
    return { bgColor, fontColor, mainBgColor, subFontColor, anotherColor, borderColor, formFontColor };
}
